chore(event-email): event email notification now contains link to a particular repetition #499
Merged
chore(event-email): event email notification now contains link to a particular repetition #499
Conversation
Introduces the repetitionId field to event notification data structures and templates, allowing emails and notifications to reference specific event repetitions. Updates TypeScript interfaces, worker logic, and email templates to support and display repetitionId where applicable.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for linking to specific event repetitions in email notifications. Previously, all event emails linked to the original event regardless of which repetition triggered the notification. Now, the repetitionId is passed through the entire notification pipeline (Grouper → Notifier → Sender → Email templates) to generate URLs that point to the specific repetition that triggered the notification.
Key Changes:
- Added
repetitionIdfield to type definitions across the notification pipeline - Updated email templates to conditionally generate URLs with repetition ID when available
- Added test assertion for the new
repetitionIdfield
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| workers/sender/types/template-variables/event.ts | Added optional repetitionId field to TemplateEventData interface |
| workers/sender/src/index.ts | Extracts and forwards repetitionId from event data to template variables |
| workers/notifier/types/notifier-task.ts | Added repetitionId field to NotifierEvent type |
| workers/notifier/types/channel.ts | Added repetitionId field to SenderData interface |
| workers/notifier/src/index.ts | Passes repetitionId from event to sender worker |
| workers/grouper/tests/index.test.ts | Updated test to expect repetitionId: null for new events |
| workers/grouper/src/index.ts | Converts ObjectId to string and passes repetitionId to notifier |
| workers/email/src/templates/emails/event/text.twig | Conditionally generates URL with /repetitionId/overview when repetitionId exists |
| workers/email/src/templates/emails/event/html.twig | Conditionally generates URL with /repetitionId/overview when repetitionId exists |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
neSpecc
added a commit
that referenced
this pull request
Dec 24, 2025
…articular repetition (#499) (#502) * Add repetitionId to event notification flow Introduces the repetitionId field to event notification data structures and templates, allowing emails and notifications to reference specific event repetitions. Updates TypeScript interfaces, worker logic, and email templates to support and display repetitionId where applicable. * fix grouper test Co-authored-by: Peter <specc.dev@gmail.com>
neSpecc
added a commit
that referenced
this pull request
Dec 24, 2025
* chore(event-email): event email notification now contains link to a particular repetition (#499) * Add repetitionId to event notification flow Introduces the repetitionId field to event notification data structures and templates, allowing emails and notifications to reference specific event repetitions. Updates TypeScript interfaces, worker logic, and email templates to support and display repetitionId where applicable. * fix grouper test * fix(sentry): replay skipping improved (#503) * fix sentry replay skipping * lint code * Update index.test.ts --------- Co-authored-by: Peter <specc.dev@gmail.com>
e11sy
added a commit
that referenced
this pull request
Feb 9, 2026
* chore(sentry): add some debug logs (#500) * add logs to sentry worker * tune logs * Update index.ts * fix tests * chore(event-email): event email notification now contains link to a particular repetition (#499) * Add repetitionId to event notification flow Introduces the repetitionId field to event notification data structures and templates, allowing emails and notifications to reference specific event repetitions. Updates TypeScript interfaces, worker logic, and email templates to support and display repetitionId where applicable. * fix grouper test * fix(sentry): replay skipping improved (#503) * fix sentry replay skipping * lint code * Update index.test.ts * Log Sentry client_report items for debugging (#505) Added handling for 'client_report' items in Sentry envelopes to log their internals for easier debugging of dropped events and SDK/reporting issues. Decodes payloads as needed and logs errors if decoding fails. * bug(sentry): Flatten nested objects in backtrace frame arguments using dot notation (#509) * Initial plan * Implement dot notation for nested objects in backtrace frame arguments Co-authored-by: neSpecc <3684889+neSpecc@users.noreply.github.com> * Fix empty array handling to be consistent with empty objects Co-authored-by: neSpecc <3684889+neSpecc@users.noreply.github.com> * Remove unrelated file changes that should not be affected by the solution Co-authored-by: neSpecc <3684889+neSpecc@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: neSpecc <3684889+neSpecc@users.noreply.github.com> * chore(setup): migrate from node 16 to 24 (#512) * Upgrade to Node.js 24 and update TypeScript config Update all workflows, Dockerfiles, and .nvmrc to use Node.js 24 for consistency and latest features. Enable 'moduleResolution: node' and 'skipLibCheck' in tsconfig.json to improve TypeScript compatibility and speed up builds. * upd packages * Update jest.setup.redis-mock.js * Update jest.global-teardown.js * fix tests * Update jest.setup.redis-mock.js * disable redis tests * rm skip * Update jest.config.js * rm skips * lint code * Task manager (#511) * Add Task Manager worker for auto GitHub issue creation Introduces a new worker at workers/task-manager that automatically creates GitHub issues for events meeting a threshold, with daily rate limiting and atomic usage tracking. Includes environment setup, documentation, and updates @hawk.so/types to v0.5.3. * Integrate GitHub issue creation and Copilot assignment Added GitHubService for authenticating as a GitHub App and creating issues via the GitHub API. Implemented formatting of issue data from events, including stacktrace and source code snippets. Updated TaskManagerWorker to use real GitHub issue creation and Copilot assignment, replacing previous mocked logic. Added environment variables for GitHub App configuration and updated documentation. Included tests for issue formatting. * Refactor GitHub key handling and improve Copilot assignment Extracted GitHub App private key normalization to a utility for better reliability and CI compatibility. Enhanced Copilot assignment to use the GraphQL API and improved error handling. Refactored task creation flow to increment usage only after successful issue creation, updated dependencies, and fixed import paths. * use pat * Add delegated user OAuth support and token refresh for GitHub integration Introduces delegated user-to-server OAuth support for GitHub App integration in the task manager worker. Adds logic for handling delegated user tokens, including automatic refresh and fallback to installation tokens, and updates environment/configuration to support GitHub App OAuth credentials. Updates dependencies to include @octokit/oauth-methods and related packages. * Refactor GitHub issue creation and Copilot assignment Separated GitHub issue creation and Copilot agent assignment into distinct steps. The issue is now always created using the GitHub App installation token, and Copilot is assigned afterward using a user-to-server OAuth token if enabled. Updated the TaskManagerWorker logic to reflect this change, improved error handling, and updated the event saving logic to accurately reflect Copilot assignment status. * Update GithubService.ts * lint code * lint and tests * Fix task manager env parsing and event timestamp filter Replaces Number() with parseInt() for MAX_AUTO_TASKS_PER_DAY to ensure correct parsing. Fixes event query to filter by timestamp using connectedAt, and enables the super.start() call. Also corrects a typo in a comment in GrouperWorker. * Update package.json * update issue format * lint * Add PR Assistant workflow configuration (#507) Co-authored-by: Peter <specc.dev@gmail.com> * Update package.json * Fix DataFilter false positives for UUIDs and MongoDB ObjectIds (#518) * Initial plan * Fix DataFilter to not filter UUIDs and MongoDB ObjectIds Co-authored-by: neSpecc <3684889+neSpecc@users.noreply.github.com> * Address code review feedback: improve UUID regex and test coverage Co-authored-by: neSpecc <3684889+neSpecc@users.noreply.github.com> * Fix tests to use values that would actually fail without UUID/ObjectId detection Co-authored-by: neSpecc <3684889+neSpecc@users.noreply.github.com> * upd version --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: neSpecc <3684889+neSpecc@users.noreply.github.com> Co-authored-by: Peter Savchenko <specc.dev@gmail.com> * fix(grouper): filter oldPassword and newPassword in event payload (#516) * fix(grouper): filter oldPassword and newPassword in event payload * chore: add more keys and update tests * chore: lint fix * fix(tests): rename sessionId to requestId in data-filter tests for clarity * chore(grouper): add counters to the grouper worker * chore(): eslint fix * chore(): clean up * chore(grouper): remove redundant rate-limit increment logic * chore(grouper): remove redundant mocks * chore(): eslint fix * chore(): change metric type * Update workers/grouper/src/index.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * imp(): use lua for create if not exists, to avoid race-cond --------- Co-authored-by: Peter <specc.dev@gmail.com> Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: neSpecc <3684889+neSpecc@users.noreply.github.com> Co-authored-by: Kuchizu <70284260+Kuchizu@users.noreply.github.com> Co-authored-by: Dobrunia Kostrigin <48620984+Dobrunia@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
For each event we send email with link to the original event. Not the particular repetition.
Cause
Grouper was added a task to Notifier without passing a
repetitionId.Solution
repetitionIdfrom Grouper to NotifierrepetitionId